use serde::{Deserialize, Serialize};

pub type Infos = Vec<UpdateInfo>;

#[derive(Debug, Deserialize, Serialize, Clone)]
pub struct UpdateInfo {
    pub id: u32,
    /// tag 用来验证版本
    pub tag_name: String,
    /// 此版本名称
    pub name: String,
    /// 更新公告
    pub body: String,
    /// 创建时间
    pub created_at: String,
    pub assets: Vec<Asset>,
}

#[derive(Debug, Deserialize, Serialize, Clone)]
pub struct Asset {
    /// 下载地址
    pub browser_download_url: String,
    /// 名字 用来验证是不是软件
    pub name: String,
}
